package com.lagou.edu.controller;

import com.edu.result.ResponseDTO;
import com.lagou.edu.dto.PromotionSpaceDTO;
import com.lagou.edu.remoteservice.AdRemoteService;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import java.util.List;

/**
 * @author wpp25
 * @date 2021/8/4 21:27
 * @description：
 */
@RestController
@RequestMapping("/ad")
public class AdController {

    @Resource
    private AdRemoteService adRemoteService;

    @RequestMapping("/space/getAllSpaces")
    public ResponseDTO getAllSpace() throws Exception{
        List<PromotionSpaceDTO> dtoList = adRemoteService.getAllSpaces();
        return ResponseDTO.success(dtoList);
    }
}
